package com.jt.safe.ui.parent.fragment

import android.content.Intent
import androidx.recyclerview.widget.LinearLayoutManager
import com.jt.safe.R
import com.jt.safe.base.BaseFragment
import com.jt.safe.ui.adpter.MessageSchoolAdapter
import com.jt.safe.ui.parent.activity.MessageSchoolDetailActivity
import com.jt.safe.viewmodel.NullViewModel
import kotlinx.android.synthetic.main.fragment_message_view_pager.*

class MessageSchoolFragment : BaseFragment<NullViewModel>() {
    val data = mutableListOf<String>("", "", "", "", "", "")

    companion object {
        fun newInstance() = MessageSchoolFragment()
    }

    override val layoutId: Int
        get() = R.layout.fragment_message_view_pager

    override fun initView() {
        val messageSchoolAdapter = MessageSchoolAdapter()
        recycler.layoutManager = LinearLayoutManager(activity)
        recycler.adapter = messageSchoolAdapter
        messageSchoolAdapter.setNewData(data)
        messageSchoolAdapter.setOnItemClickListener { adapter, view, position ->
            startActivity(Intent(activity, MessageSchoolDetailActivity::class.java))
        }
    }

    override fun createObserver() {

    }

    override fun initData() {

    }
}
